.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 21px;
}

.content {
  width: 100%;
}

.searchBar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  margin: 0 auto 16px;
  width: 100%;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-radius: 8px;

  .searchInfo {
    margin-top: 8px;
    padding: 0 4px;
    color: #8c8c8c;
  }
}

.scrollContent {
  width: 100%;
  margin: 0 auto;
  padding: 0;
  overflow: auto;
  height: calc(100vh - 140px);

  &::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }

  &::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
  }

  &::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
  }
}

.dynamicCard {
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.3s;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);

  &:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .dynamicContent {
    padding: 20px;

    .title {
      font-size: 18px;
      font-weight: 600;
      color: #333;
      margin-bottom: 8px;
      line-height: 1.4;
    }

    .time {
      color: #8c8c8c;
      font-size: 14px;
      margin-bottom: 12px;

      .anticon {
        margin-right: 4px;
      }
    }

    .text {
      font-size: 15px;
      line-height: 1.6;
      color: #595959;
      margin-bottom: 16px;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
  }
}

// 媒体网格样式
.mediaGrid {
  display: grid;
  gap: 4px;

  &.singleMedia {
    grid-template-columns: minmax(0, 2fr);
    
    .mediaWrapper {
      padding-bottom: 56.25%;
    }
  }

  &.doubleMedia {
    grid-template-columns: repeat(2, 1fr);
    
    .mediaWrapper {
      padding-bottom: 100%;
    }
  }

  &.tripleMedia {
    grid-template-columns: repeat(3, 1fr);
    
    .mediaWrapper {
      padding-bottom: 100%;
    }
  }

  &.quadMedia {
    grid-template-columns: repeat(2, 1fr);
    
    .mediaWrapper {
      padding-bottom: 100%;
    }
  }

  &.multiMedia {
    grid-template-columns: repeat(3, 1fr);
    
    .mediaWrapper {
      padding-bottom: 100%;
    }
  }

  .mediaWrapper {
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
    border-radius: 4px;

    .imageItem,
    .videoItem {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;

      :global {
        .ant-image {
          width: 100%;
          height: 100%;
          
          img {
            width: 100%;
            height: 100%;
            object-fit: cover;
          }

          .ant-image-mask {
            background: rgba(0, 0, 0, 0.5);
            opacity: 0;
            transition: opacity 0.3s;

            &:hover {
              opacity: 1;
            }
          }
        }
      }

      .videoMask {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #fff;

        .anticon {
          font-size: 32px;
          margin-bottom: 8px;
        }

        span {
          font-size: 14px;
        }
      }

      .playIcon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 36px;
        color: #fff;
        z-index: 1;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        pointer-events: none;
      }

      .moreOverlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        font-weight: 600;
        z-index: 2;
        pointer-events: none;
      }
    }
  }
}

.loadingMore {
  display: block;
  text-align: center;
  margin: 12px 0;
}

.noMore {
  text-align: center;
  color: #999;
  padding: 12px 0;
}

:global {
  .ant-image-preview-operations {
    .ant-image-preview-switch-left,
    .ant-image-preview-switch-right {
      width: 44px;
      height: 44px;
      background: rgba(255, 255, 255, 0.2);
      border-radius: 50%;

      &:hover {
        background: rgba(255, 255, 255, 0.3);
      }
    }
  }

  .ant-image-preview-body {
    video {
      display: block;
      margin: 0 auto;
    }
  }
}

@media (max-width: 768px) {
  .container {
    padding: 12px;
  }

  .searchBar {
    margin-bottom: 12px;
    border-radius: 4px;
  }

  .scrollContent {
    padding: 0;
  }

  .dynamicCard {
    margin-bottom: 12px;
  }
}

.loadingWrapper {
  padding: 24px 0;
  text-align: center;
}

.endMessage {
  padding: 16px 0;
  text-align: center;
  color: #999;
} 